# -*- encoding: utf-8 -*-
'''
@File    :   real_route.py
@Time    :   2023/12/02
@Author  :   Han Xiao
@Brief   :   根据提供log 绘制实际行驶路线图
'''

import argparse

parser = argparse.ArgumentParser()
parser.add_argument('-l','--log', help="LOG 文件路径，使用绝对路径")
parser.add_argument('-d','--day', help="日期，务必确认，格式 MMDD")
parser.add_argument('-ts','--time_start',help="开始时间 格式 hhmmss")
parser.add_argument('-te','--time_end',help="结束时间 格式 hhmmmss")
# HXG TODO 开始时间+持续时间
args = parser.parse_args()

if args.log:
    log_path = args.log
else:
    parser.print_help()
    exit()

if args.day:
    day = args.day
else:
    parser.print_help()
    exit()

if args.time_start and len(args.time_start) == 6:
    start_hour = args.time_start[:2]
    start_min = args.time_start[2:4]
    start_sec = args.time_start[4:]
else:
    parser.print_help()
    exit()

if args.time_end and len(args.time_end) == 6:
    end_hour = args.time_end[:2]
    end_min = args.time_end[2:4]
    end_sec = args.time_end[4:]
else:
    parser.print_help()
    exit()

s_time = start_hour + ":" + start_min + ":" + start_sec
e_time = end_hour + ":" + end_min + ":" + end_sec